Auto merge of #3139 - jhbabon:improve-replace-parsing-error-msg, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 3 Oct 2016 17:52:53 +0000 (10:52 -0700)
committerGitHub <noreply@github.com>
Mon, 3 Oct 2016 17:52:53 +0000 (10:52 -0700)
commitebcf0a8f41759717876bca5871137ab48e06f790
tree075badf76938420229a831a0827ff97cc37d4e70
parent642853783da66d19efe5b4d3305cb424218f49ee
parent89b2d267244b244776aa12bbae9bd0441a350ef6
Auto merge of #3139 - jhbabon:improve-replace-parsing-error-msg, r=alexcrichton

Show an error messager for invalid semver spec for packages in the [replace] section.

The `[replace]` section in the `Cargo.toml` file doesn't allow invalid semver specsfor packages, so something like this:

```toml
[dependencies]
foo = "*"

[replace]
"foo:*" = { git = 'https://example.com' }
```

It's not valid. In this case we will display an error message like this:

```
error: failed to parse manifest at `Cargo.toml`

Caused by:
  replacements must specify a valid semver version to replace, but `foo:*` does not

Caused by:
  Parse error
```

closes #3129